package top.kpromise.note.modules.user.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;

@Getter
@Setter
public class UserInfo {

    @ApiModelProperty(name = "roles" , value = "用户权限")
    private ArrayList<String> roles;

    @ApiModelProperty(name = "name" , value = "用户昵称")
    private String name;

    @ApiModelProperty(name = "avatar" , value = "用户头像")
    private String avatar;

    @ApiModelProperty(name = "introduction" , value = "用户简介")
    private String introduction;

    public void init(String nickName) {
        this.name = nickName;
        this.roles = new ArrayList<>();
        this.roles.add("admin");
        this.avatar = "https://ssyerv1.oss-cn-hangzhou.aliyuncs.com/picture/38053fccc9b542c0a8f39a51b23fcdf2.jpg";
        this.introduction = "A Programmer And A Father";
    }
}
